package com.yesep.learn.hik.service.impl;

import com.sun.jna.NativeLong;
import com.yesep.learn.hik.model.Hik;
import com.yesep.learn.hik.sdk.HCNetSDK;
import com.yesep.learn.hik.service.IHikService;
import org.springframework.stereotype.Service;

@Service
public class HikServiceImpl implements IHikService {
	@Override
	public Hik findHikByIp(String ip) {
		Hik hik = new Hik();
		hik.setIp(ip);
		hik.setPort((short) 8000);
		hik.setUserName("admin");
		hik.setPassword("yesep18157101217");
		hik.setDeviceInfo(new HCNetSDK.NET_DVR_DEVICEINFO_V30());
		hik.setLChannel("192.168.8.52".equals(ip) ? 1 : 33);
		return hik;
	}
}
